-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(Button): auto generate visual test #1623
Conversation
Playwright Test Component is ready. |
Preview is ready. |
@@ -0,0 +1,75 @@ | |||
import chunk from 'lodash/chunk'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a utility for generating regressive tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't plan to use it, let's remove
import {ButtonStories, CustomIconSizeButton} from './helpersPlaywright'; | ||
|
||
test.describe('Button', () => { | ||
test.describe('Button', {tag: '@Button'}, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a tag for the component so that you can run tests for one or more components
package.json
Outdated
@@ -85,7 +85,7 @@ | |||
"typecheck": "tsc --noEmit", | |||
"prepublishOnly": "npm run build", | |||
"playwright:install": "playwright install --with-deps", | |||
"playwright": "playwright test --config=playwright/playwright.config.ts", | |||
"playwright": "playwright test --config=playwright/playwright.config.ts --grep-invert=@regression", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all components without regression tests
playwright test --config=playwright/playwright.config.ts --grep-invert=@regression
one component
playwright test --config=playwright/playwright.config.ts --grep=@Button
one component with smoke tests
playwright test --config=playwright/playwright.config.ts --grep=@Button --grep=@smoke
all smoke tests
playwright test --config=playwright/playwright.config.ts --grep=@smoke
f44827d
to
1f69dda
Compare
Visual Tests Report is ready. |
removed regression tests |
|
||
export const loadingCases: Cases<ButtonProps['loading']> = [['loading', true]]; | ||
|
||
export const viewsCases: Cases<ButtonProps['view']> = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to keep flat array of values in cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,75 @@ | |||
import chunk from 'lodash/chunk'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't plan to use it, let's remove
No description provided.